package cc.catface.dao.biz.app.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@ApiModel
public class SaveUserChannelINDTO {
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;
    @ApiModelProperty(value = "频道信息", required = true)
    private List<ChannelInfo> channelInfos;
    @ApiModelProperty(value = "创建时间[yyyy-MM-dd HH:mm:ss]", required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @Data
    @ApiModel
    public static class ChannelInfo {
        @ApiModelProperty(value = "频道ID", required = true)
        private int channelId;
        @ApiModelProperty(value = "频道名称", required = true)
        private String channelName;
        @ApiModelProperty(value = "排序", required = true)
        private int ord;
    }
}
